package cn.it62.pojo;

import java.util.Objects;


/**
 * @author zhenhuaShen
 * @version 1.0
 * @date 2019/8/7
 * @description cn.it62.pojo
 */
public class Person {
    private String id;
    private int age;
    private String useName;

    public Person() {

    }
    public Person(String id, int age, String useName) {
        this.id = id;
        this.age = age;
        this.useName = useName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getUseName() {
        return useName;
    }

    public void setUseName(String useName) {
        this.useName = useName;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                ", age=" + age +
                ", useName='" + useName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){ return true;}
        if (!(o instanceof Person)){ return false;}
        Person person = (Person) o;
        return Objects.equals(getId(), person.getId());
    }

    @Override
    public int hashCode() {

        return Objects.hash(getId());
    }
}















